#ifndef SHOWSETTING_H
#define SHOWSETTING_H

#include <QObject>
#include <QLabel>
#include <QSpinBox>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>

#include "ui/DoubleSlider/DoubleSlider.h"
#include "ui/optionWidget/optionsItem/optionItemMiddleWidget/MiddleWidgetVirtual.h"

class ShowSetting : public MiddleWidgetVirtual
{
    Q_OBJECT
public:
    explicit ShowSetting();
    int RFixedHeight() override;
    int fixedWidth(ParameterKind kind = ParameterKind::Get, int widget = 0) override;
    bool setPaletteBF(const QPalette& palette) override;
    void LanguageInit() override;
private:
    QHBoxLayout* m_GammaLayout;         // 伽马值区域布局
    QLabel* m_GammaLabel;               // 伽马值label
    QDoubleSpinBox* m_GammaSB;                // 伽马值旋钮
    DoubleSlider* m_GammaSlider;        // 伽马值滑动槽

    QHBoxLayout* m_CompLayout;          // 对比度区域布局
    QLabel* m_CompLabel;                // 对比度label
    QDoubleSpinBox* m_CompSB;                 // 对比度旋钮
    DoubleSlider* m_CompSlider;         // 对比度滑动槽

    QHBoxLayout* m_LumLayout;           // 亮度区域布局
    QLabel* m_LumLabel;                 // 亮度label
    QSpinBox* m_LumSB;                  // 亮度旋钮
    DoubleSlider* m_LumSlider;          // 亮度滑动槽

    QHBoxLayout* m_ChromaLayout;        // 饱和度区域布局
    QLabel* m_ChromaLabel;              // 饱和度label
    QSpinBox* m_ChromaSB;               // 饱和度旋钮
    DoubleSlider* m_ChromaSlider;       // 饱和度滑动槽

    QPushButton* m_DefaultBtn;          // 恢复默认按钮
    QVBoxLayout* m_ShowSettingLayout;   // ShowSetting总布局
signals:
    /*
     * signalKind 表示需要发送数值的类型（曝光、增益）
     * int 是需要修改后的值
     */
    void senderValue(signalKind, int);
private:
    /**
     @interpret 为ShowSetting区域中各种控件初始化
     */
    void ShowSettingInit();
private:
    int m_FixedHeight = 220;
    int m_FixedWidth = 300;
};

#endif // SHOWSETTING_H
